<template>
    <div>
        <el-table :show-header="!flag" :border="false" row-key="id" :tree-props="{children:'childrean'}" :data="menuData"  style="width: 100%;height:100%px;"  >

<!-- <el-table-column  type="expand" fixed ></el-table-column> -->
<el-table-column  fixed  width="0"  type="expand"  >
  <template slot-scope="props">
    <menutable :flag="true" :menuData="props.row.children"></menutable>
  </template>
</el-table-column>

<el-table-column  prop="id" label="编号"></el-table-column>
<el-table-column  prop="name" label="菜单名称"></el-table-column>
<el-table-column prop="alias" label="菜单别名"></el-table-column>
<el-table-column prop="path" label="菜单路径"></el-table-column>
<el-table-column prop="createTime" label="创建时间"></el-table-column>
<el-table-column prop="updateTime" label="修改时间"></el-table-column>

<el-table-column fixed="right" label="操作"  width="220">
  <template slot-scope="scope">
    <el-button
      @click="openMenuInfoWindow(scope.row, 'getInfo')" type="primary" size="small" >查看</el-button >
    <el-button
      @click="openMenuInfoWindow(scope.row, 'updateInfo')" type="success" size="small" >编辑</el-button>
    <el-button @click="deleteMenuById(scope.row.id)" type="danger" size="small">删除</el-button>
  </template>
</el-table-column>
</el-table>
    </div>
</template>

<script>
export default {
  name:'menutable',
  data () {
    return {

    }
  },
  props:['menuData','flag']
}
</script>
<style>
</style>
